home *** CD-ROM | disk | FTP | other *** search
-
-
-
- ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333)))) ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333))))
-
-
-
- NNNNAAAAMMMMEEEE
- _pppp_cccc_iiii_bbbb_rrrr______rrrr_rrrr_bbbb______cccc_hhhh_eeee_cccc_kkkk - query RRB allocation
- _pppp_cccc_iiii_bbbb_rrrr______rrrr_rrrr_bbbb______aaaa_llll_llll_oooo_cccc - allocate RRBs for this slot
- _pppp_cccc_iiii_bbbb_rrrr______aaaa_llll_llll_oooo_cccc______aaaa_llll_llll______rrrr_rrrr_bbbb_ssss - allocate RRBs for slot group
- _pppp_cccc_iiii_bbbb_rrrr______ssss_eeee_tttt______rrrr_rrrr_bbbb______cccc_aaaa_llll_llll_bbbb_aaaa_cccc_kkkk - set up allocation callback
-
- SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
- #include <sys/PCI/pcibr.h>
-
- int
- pcibr_rrb_alloc(
- vertex_hdl_t _p_c_o_n_n__v_h_d_l,
- int *_c_o_u_n_t__v_c_h_a_n_0,
- int *_c_o_u_n_t__v_c_h_a_n_1)
-
- int
- pcibr_rrb_check(vertex_hdl_t _p_c_o_n_n__v_h_d_l,
- int *_c_o_u_n_t__v_c_h_a_n_0,
- int *_c_o_u_n_t__v_c_h_a_n_1,
- int *_c_o_u_n_t__r_e_s_e_r_v_e_d,
- int *_c_o_u_n_t__p_o_o_l)
-
- int
- pcibr_alloc_all_rrbs(
- vertex_hdl_t _x_c_o_n_n__v_h_d_l,
- int _e_v_e_n__o_d_d,
- int _d_e_v__1__r_r_b_s, int _v_i_r_t_1,
- int _d_e_v__2__r_r_b_s, int _v_i_r_t_2,
- int _d_e_v__3__r_r_b_s, int _v_i_r_t_3,
- int _d_e_v__4__r_r_b_s, int _v_i_r_t_4)
-
- void
- pcibr_set_rrb_callback(
- vertex_hdl_t _x_c_o_n_n__v_h_d_l,
- rrb_alloc_funct_t _r_r_b__a_l_l_o_c__f_u_n_c_t)
-
-
-
- AAAArrrrgggguuuummmmeeeennnnttttssss
- _p_c_o_n_n__v_h_d_l
- is an appropriate PCI connection point.
-
- _x_c_o_n_n__v_h_d_l
- is an appropriate XIO connection point.
-
- _c_o_u_n_t__v_c_h_a_n_0, _c_o_u_n_t__v_c_h_a_n_1
- is where to get and where to return RRB counts for the primary
- and alternate virtual DMA channels.
-
- _e_v_e_n__o_d_d
- specifies whether _p_c_i_b_r__a_l_l_o_c__a_l_l__r_r_b_s() is operating on the RRB
- allocations for the even numbered or the odd numbered PCI DMA
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333)))) ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333))))
-
-
-
- REQ/GNT pairs. Zero specifies the even pairs, One specifies the
- odd pairs.
-
- _d_e_v__N__r_r_b_s
- specifies the total RRBs to be allocated for both virtual
- channels for the corresponding REQ/GNT pair.
-
- _v_i_r_t_N specifies whether alternate virtual channel accesses will be made
- using the corresponding REQ/GNT pair.
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- Drivers are not normally expected to need to call any of these functions;
- they exist for the use of drivers that service devices that actually
- contain the SGI XIO-PCI Bridge ASIC.
-
- _p_c_i_b_r__r_r_b__a_l_l_o_c() is used to adjust the allocation for a specific PCI DMA
- REQ/GNT pair, when the automatic allocation is insufficient, without
- modifying the RRB allocations for other REQ/GNT pairs.
-
- _p_c_i_b_r__r_r_b__c_h_e_c_k() can be used to observe the current RRB allocation state
- for a REQ/GNT pair without changing it. Note that the pool value
- returned may change as other device drivers within the same RRB pool
- allocate RRBs.
-
- _p_c_i_b_r__a_l_l_o_c__a_l_l__r_r_b_s() can be used to efficiently set up the allocation
- for all four devices in the RRB pool.
-
- The most common time to modify RRBs is from a NIC callback based on
- recognizing the XIO part number. However, some drivers may want to do
- further RRB adjustment after the infrastructure hsa probed the contents
- of the PCI bus. _p_c_i_b_r__s_e_t__r_r_b__c_a_l_l_b_a_c_k() can be used to specify a
- function to be called when pcibr has finished taking inventory on the
- bus; it is passed the XIO connection point and an array containing the
- VENDOR_ID values from the eight PCI slots.
-
- AAAAuuuuttttoooommmmaaaattttiiiicccc RRRRRRRRBBBB MMMMaaaannnnaaaaggggeeeemmmmeeeennnntttt
- During the booting process, the pcibr module observes the RRB allocations
- that may have been made by the boot prom. Any RRBs assigned to REQ/GNT
- pairs corresponding to IDSEL pins on which there is no response (and
- which are not noted specially as secondary REQ/GNT pairs using the pcibr
- hint mechanism are unassigned.
-
- Based on the number of unassigned RRBs in each group, the number of
- active PCI DMA REQ/GNT pairs and the preallocation of RRBs, some
- unassigned RRBs will be reserved for each active REQ/GNT pair so that
- each pair can have up to three RRBs. The reservation level may be
- decreased to avoid overbooking the RRBs.
-
- When DMA related requests are received by pcibr from pciio, a check is
- made that at least one RRB is actually assigned to that REQ/GNT pair and
- virtual channel; if not, one is assigned, either from that pair's
- reservation pool or from the free pool. If the DMA is marked as
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-
-
-
- ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333)))) ppppcccciiiibbbbrrrr____rrrrrrrrbbbb((((DDDD3333))))
-
-
-
- PREFETCH, an attempt is made to allocate a second RRB.
-
- In nearly all cases, the above algorithm provides sufficient RRB
- resources for optimum DMA performance.
-
- NNNNOOOOTTTTEEEESSSS
- Failure to automatically allocate an RRB does not currently cause a
- failure to map the DMA, but if no RRBs are assigned and the device
- attempts to do a read it will stall forever on the PCI bus.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- nic_vmc(D3), pcibr_hints(D3), pciio(D3)
-
- DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
- All functions return zero if all went well, or negative if there was a
- problem.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 3333
-
-
-
-